package dto

// CreateAddressReq 创建地址请求
type CreateAddressReq struct {
	Name         string `json:"name" binding:"required"`
	Mobile       string `json:"mobile" binding:"required"`
	ProvinceCode string `json:"province_code" binding:"required"`
	ProvinceName string `json:"province_name" binding:"required"`
	CityCode     string `json:"city_code" binding:"required"`
	CityName     string `json:"city_name" binding:"required"`
	DistrictCode string `json:"district_code" binding:"required"`
	DistrictName string `json:"district_name" binding:"required"`
	Address      string `json:"address" binding:"required"`
	HouseNumber  string `json:"house_number"`
	PostCode     string `json:"post_code"`
	Tag          string `json:"tag"`
	IsDefault    int    `json:"is_default"`
}

// UpdateAddressReq 更新地址请求
type UpdateAddressReq struct {
	Id           int64  `json:"id" binding:"required"`
	Name         string `json:"name"`
	Mobile       string `json:"mobile"`
	ProvinceCode string `json:"province_code"`
	ProvinceName string `json:"province_name"`
	CityCode     string `json:"city_code"`
	CityName     string `json:"city_name"`
	DistrictCode string `json:"district_code"`
	DistrictName string `json:"district_name"`
	Address      string `json:"address"`
	HouseNumber  string `json:"house_number"`
	PostCode     string `json:"post_code"`
	Tag          string `json:"tag"`
	IsDefault    int    `json:"is_default"`
	Status       int    `json:"status"`
}

// ListAddressReq 查询地址列表请求
type ListAddressReq struct {
	Status int `form:"status"`
}

// AddressResp 地址响应
type AddressResp struct {
	Id           int64  `json:"id"`
	Name         string `json:"name"`
	Mobile       string `json:"mobile"`
	ProvinceCode string `json:"province_code"`
	ProvinceName string `json:"province_name"`
	CityCode     string `json:"city_code"`
	CityName     string `json:"city_name"`
	DistrictCode string `json:"district_code"`
	DistrictName string `json:"district_name"`
	Address      string `json:"address"`
	HouseNumber  string `json:"house_number"`
	PostCode     string `json:"post_code"`
	Tag          string `json:"tag"`
	IsDefault    int    `json:"is_default"`
	Status       int    `json:"status"`
}

// ListAddressResp 地址列表响应
type ListAddressResp struct {
	List []*AddressResp `json:"list"`
}
